import { useState } from 'react'
import { HashRouter, BrowserRouter,Route,Routes,Navigate } from 'react-router-dom'
import { Button, Space } from 'antd';
import Login from './pages/Login';
import NavPage from './pages/nav';
import Home from './pages/home';
import Todo from './components/Todo';
import Mine from './components/mine';
import UserList from './pages/UserList';
import AddUser from './pages/AddUser';
function App() {
  const [count, setCount] = useState(0)
  const changeNum=(e)=>{
      console.log(e);
  }
  return (
   <HashRouter>
    <Routes>
      <Route path='/' element={<Navigate to={"/login"} />}> </Route>
      <Route path='/Login' element={<Login/>}> </Route>
      <Route path='/NavPage' changea={changeNum} element={<NavPage/>}> 
           <Route path='home' element={<Home/>}> 333</Route>
           <Route path='todo' element={<Todo/>}> 333</Route>
           <Route path='userList' element={<UserList/>}> </Route>
           <Route path='mine' element={<Mine/>}> </Route>
           <Route path='addUser' element={<AddUser/>}> </Route>
      </Route>
    </Routes>
   </HashRouter>
  )
}

export default App
